<template>
  <div class="wrap" ref="home">
    <button @click="goMine">我的</button>
    <Header title="vv"/>
  </div>

</template>

<script setup>
import Header from './vHead.vue'
import {useRouter,useRoute,onBeforeRouteLeave} from 'vue-router'
import {reactive, ref, isReactive, computed, provide,onMounted} from "vue";
let vc = reactive({
  longitude: 90,
  latitude: 135
})
onMounted(()=>{
})
const router = useRouter()
const route = useRoute()
onBeforeRouteLeave((to,from)=>{
  console.log(to)
  console.log(from)
  return true
})
let goMine = ()=>{
  console.log(route.query)
  router.push({
    path: '/mine'
  })
}
provide('geolocation', vc)
</script>

<style scoped lang="scss">
.wrap {
  width: 100%;
  height: 100vh;
}
</style>